package org.jeecg.modules.common.basevo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecg.config.mybatis.TenantContext;
import org.jeecgframework.poi.excel.annotation.Excel;

import java.util.List;

@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="基础查询对象", description="BaseQueryVo")
public class BaseQueryVo extends BaseVo  {
    /**一键查询字段*/
    @ApiModelProperty(value = "一键查询字段")
    @TableField(exist = false)
    public String queryValues;


    /**学校编码（租户id）*/
    @Excel(name = "学校id", width = 15)
    @ApiModelProperty(value = "学校id")
    @TableField(exist = false)
    @Dict(dicCode = "id",dicText = "name",dictTable = "sys_tenant")
    public String schoolId ;

    /**部门编码*/
    @Excel(name = "部门编码", width = 15)
    @ApiModelProperty(value = "部门编码")
    @TableField(exist = false)
    @Dict(dicCode = "org_code",dicText = "depart_name",dictTable = "sys_depart")
    public String sysOrgCode;

    //下级部门：用于按当前登录部门实现数据过滤,只显示当前和下级部门的数据
    @TableField(exist = false)
    public List<String> subDepIdsList;
    //下级部门：用于按当前登录部门实现数据过滤,只显示当前和下级部门的数据
    @TableField(exist = false)
    public String  subDepSysOrgCodes;
    //用户身份：用于按当前登录用户的不同身份实现数据过滤
    @TableField(exist = false)
    public int userIdentity;

    /**查询字段*/
    @ApiModelProperty(value = "年级id")
    @TableField(exist = false)
    public String gradeId;
    /**查询字段*/
    @ApiModelProperty(value = "班级id")
    @TableField(exist = false)
    public String classId;
    /**查询字段*/
    @ApiModelProperty(value = "科目id")
    @TableField(exist = false)
    public String subjectId;
    /**查询字段*/
    @ApiModelProperty(value = "老师id")
    @TableField(exist = false)
    public String teacherId;

    // 学年
    @ApiModelProperty(value = "学年")
    @TableField(exist = false)
    @Dict(dicCode = "id",dicText = "school_year_nickname",dictTable = "cou_school_year")
    public String schoolYearId;
    // 学期
    @ApiModelProperty(value = "学期")
    @TableField(exist = false)
    @Dict(dicCode = "id",dicText = "semester_name",dictTable = "cou_semester")
    public String semesterId;

}
